package com.heima.article.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.article.articleDto.ArticleHomeDto;
import com.heima.model.article.pojos.ApArticle;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author 石头
 * @description 针对表【ap_article(文章信息表，存储已发布的文章)】的数据库操作Mapper
 * @createDate 2022-06-12 11:40:17
 * @Entity generator.domain.ApArticle
 */
public interface ApArticleMapper extends BaseMapper<ApArticle> {

    /**
     * 加载文章
     *
     * @param articleHomeDto
     * @return List<ApArticle>
     */
    List<ApArticle> load(@Param("articleHomeDto") ArticleHomeDto articleHomeDto, @Param("type") Short type);

    List<ApArticle> findArticleListByLast5days(@Param("dayParam") Date dayParam);

}




